<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta
        content="target-densitydpi =device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
        name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="blank" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <title>demo</title>
    <link href="/static/demo/static/css/wx.common.css" rel="stylesheet">
    <link href="/static/demo/static/css/wx.pay-1.0.0.css" rel="stylesheet">
</head>

<body>
    <div style="display:none;" class="TB_overlayBG" id="TB_overlay"></div>
    <p style="display:none;font-size:18px;position:absolute;top:20%;width:100%;text-align:center;color:#fff;z-index:9999"
        id="loading_p">
        <img style="margin-right:10px;" src="/static/demo/static/images/loading1.gif">支付请求中，请稍后...
    </p>
    <p style="display:none" class="hint_01" id="hint"></p>
    <div style="display:none" id="formdata"></div>
    <div class="pay">
        <section>
            <h3 class="caution">
                <p class="tip v2"><span></span></p>
            </h3>
            <article>

                <p class="nickname v2">公司编号：
                    <input type="text" value='' id="company" autofocus="autofocus">
                </p>

                <p class="nickname v2">输入金额：
                    <input type="text" value='1' id="cash">
                </p>

                <div>
                    {foreach $payment_type as $k=>$v}
                    <a class="btn_recharge" style="width: 43.5%;background: #56ABE4;" id="type" onclick="pay('{$k}');">
                        <p style="font-size:80%"> {$v} </p>
                    </a>
                    {/foreach}
                </div>

            </article>
        </section>
    </div>

    <script src="/static/demo/static/js/jquery.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/htmlreqhtml.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/cookie.1.1.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/page.resize.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/util.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/pay-2.0.4.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/bydr.pay.ali.service-1.0.js" type="text/javascript"></script>
    <script src="/static/demo/static/js/pookui.min-1.0.0.js" type="text/javascript"></script>
</body>

<script>

    function pay(type) {

        var company = document.getElementById("company").value;

        if (company == '' || company == 0) {
            alert('公司编号不能为空');
            return false;
        }

        var cash = document.getElementById("cash").value;

        if (cash == '' || cash == 0) {
            alert('金额不能为空');
            return false;
        }

        var url = "{:url('create','','','')}";

        window.location.href = url + '?' + 'company=' + company + '&' + 'cash=' + cash + '&' + 'token=' + '{$Request.token}' + '&' + 'type=' + type;
    }
</script>

</html>